package deng.java.examples;

import javax.ejb.Local;
import javax.ejb.Stateless;

import org.apache.log4j.Logger;

@Local
@Stateless
public class ShowClassLoaderRunnableBean implements Runnable {
	
	private static Logger logger = Logger.getLogger(ShowClassLoaderRunnableBean.class);
	
	@Override
	public void run() {
		Thread currentThread = Thread.currentThread();
		ClassLoader contextCL = currentThread.getContextClassLoader();
		logger.trace("This bean current Thread: " + currentThread);
		logger.trace("This bean current Thread.ClassLoader: " + contextCL); 
		logger.trace("This bean current Thread.ClassLoader.getResource(\"/\").getPath(): " + contextCL.getResource("/").getPath()); 
	}
	
}
